package wsz.rocketMq.dao;

import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;
import org.springframework.stereotype.Repository;
import wsz.rocketMq.entity.Order;

import java.sql.Timestamp;
import java.util.List;

/**
 * @author wsz
 * @date 2022/3/2 11:21
 **/
@Repository
public interface OrderDao extends JpaRepository<Order, Long> {
    @Query("select o from Order o where o.status= ?1 and o.createTime < ?2")
    List<Order> findUnPay(@Param("status") String status, @Param("date") Timestamp date);
}
